import Mock from 'mockjs'

import homeApi from './home'
import userApi from './user'
import permissionApi from './permission'
//设置延时200-2000毫秒
Mock.setup({
  timeout: '200-2000',
})

//首页相关
//拦截的是/home/getData
Mock.mock(/\/home\/getData/, 'get', homeApi.getStatisticalData)

// 用户相关
Mock.mock(/\/user\/getUser/, 'get', userApi.getUserList)
// 删除用户接口
Mock.mock(/\/user\/del/, 'get', userApi.deleteUser)
// 批量删除接口
Mock.mock(/\/user\/batchremove/, 'get', userApi.batchremove)
// 新增
Mock.mock(/\/user\/add/, 'post', userApi.createUser)
// 修改
Mock.mock(/\/user\/edit/, 'post', userApi.updateUser)

// // 权限相关
Mock.mock(/\/permission\/getMenu/, 'post', permissionApi.getMenu)
